using System;
using Widgetsphere.Core.DataAccess;

namespace ACME.Northwind.Business.Objects
{
	#region ShipperPrimaryKey

	/// <summary>
	/// A strongly-typed primary key object for the 'Shipper' table.
	/// </summary>
	[Serializable()]
	public class ShipperPrimaryKey : IPrimaryKey
	{
		private int mShipperId;

		/// <summary>
		/// The constructor for this object which takes the fields that compreise the primary key for the 'Shipper' table.
		/// </summary>
		public ShipperPrimaryKey(int shipperid)
		{
			mShipperId = shipperid;
		}

		/// <summary>
		/// A primary key for the 'Shipper' table.
		/// </summary>
		public int ShipperId
		{
			get { return mShipperId; }
		}

		/// <summary>
		/// Returns a value indicating whether the current object is equal to a specified object.
		/// </summary>
		public override bool Equals(object obj)
		{
			if (obj == null) return false;
			if (obj.GetType() == this.GetType())
			{
			bool retval = true;
			retval &= (this.ShipperId == ((ShipperPrimaryKey)obj).ShipperId);
				return retval;
			}
			return false;
		}

		/// <summary>
		/// Serves as a hash function for this particular type.
		/// </summary>
		public override int GetHashCode()
		{
			return base.GetHashCode();
		}

	}

	#endregion

}
